<template>
  <div class="">
    <el-switch
      v-for='(item) in data'
      :key='item.id'
      :active-value='true'
      :inactive-value='false'
      @change='handleChange'
      v-model='item.value'
    >
    </el-switch>
  </div>
</template>

<script>
export default {
  data(){
    return {
      data:[
        {
          id:1,
          value:false,
          title:'首页'
        },
        {
          id:2,
          value:true,
          title:'产品'
        },
        {
          id:3,
          value:true,
          title:'公司介绍'
        },
      ]
    }
  },
  methods:{
    handleChange:function (value){
       console.log(value)
    }
  }
}
</script>